class Solution:
    # @return a string
    def convertToTitle(self, num):
    	ans = ''
    	while num > 0:
    		a = num % 26
    		num = num / 26
    		if a == 0:
    			num = num - 1
    		ans = chr((a if a != 0 else 26) + ord('A') - 1) + ans
    	return ans

if __name__ == '__main__':
	so = Solution()
	print so.convertToTitle(26)